.classManagement {
  padding: 24px;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 模态框样式 */
.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.modal {
  background: white;
  border-radius: 12px;
  width: 600px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 12px 12px 0 0;
}

.modalHeader h3 {
  margin: 0;
  color: #1f2937;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.closeBtn {
  background: #f3f4f6;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #6b7280;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 600;
}

.closeBtn:hover {
  color: #374151;
  background: #e5e7eb;
  transform: scale(1.05);
}

/* 表单样式 */
.formContainer {
  padding: 32px;
  background: #ffffff;
}

.formRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: start;
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formGroup.required label::after {
  content: ' *';
  color: #ff4d4f;
  font-weight: 600;
}

.formGroup label {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
  margin-bottom: 4px;
}

.formGroup input,
.formGroup select {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #374151;
  width: 100%;
  box-sizing: border-box;
}

.formGroup input:focus,
.formGroup select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.formGroup input::placeholder,
.formGroup select::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.formGroup select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  appearance: none;
}

.formGroup input[type="number"] {
  -moz-appearance: textfield;
}

.formGroup input[type="number"]::-webkit-outer-spin-button,
.formGroup input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.errorText {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

.modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
  padding: 24px 32px;
  background: #f9fafb;
  border-radius: 0 0 12px 12px;
  border-top: 1px solid #e5e7eb;
}

.btnPrimary {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btnPrimary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btnPrimary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btnCancel {
  background: #ffffff;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btnCancel:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 添加按钮样式 */
.addButton {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.addButton:hover {
  background: linear-gradient(135deg, #40a9ff 0%, #69c0ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(24, 144, 255, 0.3);
}

.addButton:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .formRow {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modal {
    width: 95vw;
    margin: 20px;
  }

  .formContainer {
    padding: 20px;
  }

  .modalHeader {
    padding: 20px;
  }

  .modalActions {
    padding: 20px;
    flex-direction: column;
  }

  .btnPrimary,
  .btnCancel {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .classManagement {
    padding: 10px;
  }

  .modal {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    max-height: 100vh;
  }
}

/* 学生表格样式 */
.studentsTable {
  width: 100%;
  overflow-x: auto;
}

.studentsTable table {
  width: 100%;
  border-collapse: collapse;
}

.studentsTable th,
.studentsTable td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.studentsTable th {
  background: #f8fafc;
  font-weight: 600;
  color: #374151;
  position: sticky;
  top: 0;
  z-index: 10;
}

.studentsTable tbody tr:hover {
  background: #f9fafb;
}

.studentsTable tbody tr:last-child td {
  border-bottom: none;
}

